<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 200px;
            height: 200px;
            background-color: rebeccapurple;
        }
    </style>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
</head>
<body>
    <button class="btn">隐藏</button>
    <button class="btn2">显示</button>
    <div class="box" id="tt">
        哈哈
    </div>
</body>
<script>
    $(".btn").click(function(){
      
        $(".box").slideUp()
    })
    $(".btn2").click(function(){
        
        $(".box").slideDown();;
    })
</script>
</html>